package examples.camera.command
{
	import flash.display.BitmapData;
	import flash.geom.ColorTransform;
	import flash.geom.Rectangle;

	import org.seasar.akabana.yui.command.Command;

	public class CameraResizeCommand extends Command
	{
		public function CameraResizeCommand()
		{
			super();
		}

		protected override function run():void {
			var bmpData:BitmapData = _arguments[0] as BitmapData;

			var cTransform:ColorTransform = new ColorTransform();
			cTransform.alphaMultiplier = 0.7
			var rect:Rectangle = new Rectangle(0, 0, bmpData.width,
				bmpData.height);
			bmpData.colorTransform(rect, cTransform);

			result = bmpData;
		}
	}
}